home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
listings
/
v_10_01
/
1001094a
< prev
next >
Wrap
Text File
|
1991-11-16
|
346b
|
22 lines
Listing 1
//
// rational.h
//
#include <stdio.h>
class rational
{
public:
rational() { }
rational(long n, long d) : num(n), denom(d) { }
rational operator+(rational r);
rational operator-(rational r);
rational operator*(rational r);
rational operator/(rational r);
void put(FILE *);
private:
long num, denom;
};